import { IForm, IFormItem } from '@/base-ui/form'

const formItems: IFormItem[] = [
  {
    field: 'name',
    type: 'input',
    label: '用户名',
    placeholder: '请输入用户名'
  },
  {
    field: 'realname',
    type: 'input',
    label: '真实姓名',
    placeholder: '请输入真实姓名'
  },
  {
    field: 'enable',
    type: 'select',
    label: '启用状态',
    placeholder: '请选择启用状态',
    options: [
      { title: '启用', value: 1 },
      { title: '禁用', value: 0 }
    ]
  },
  {
    field: 'createAt',
    type: 'datepicker',
    label: '创建时间',
    otherOptions: {
      'start-placeholder': '开始时间',
      'end-placeholder': '结束时间',
      type: 'daterange'
    }
  }
]

const labelWidth = '100px'
const itemStyle = { padding: '5px 30px' }
const colLayout = {
  xl: 8,
  lg: 12,
  md: 12,
  sm: 24,
  xs: 24
}

export const searchFormConfig: IForm = {
  formItems: formItems,
  labelWidth: labelWidth,
  itemStyle: itemStyle,
  colLayout: colLayout
}
